package com.kun.base.redis;

import com.kun.util.PropertiesUtil;

/**
 * Created by likun on 2017/4/15.
 * Redis配置
 */
public class RedisConfig {

    public static String HOST=getConfig("redis.host");
    public static Integer PORT=Integer.valueOf(getConfig("redis.port"));
    public static String PASS=getConfig("redis.pass");
    public static String DB=getConfig("redis.db");
    public static Integer MAX_IDLE=Integer.valueOf(getConfig("redis.maxIdle"));
    public static Integer MAX_ACTIVE=Integer.valueOf(getConfig("redis.maxActive"));
    public static Integer MAX_WAIT=Integer.valueOf(getConfig("redis.maxWait"));
    public static String TEST_ON_BORROW=getConfig("redis.testOnBorrow");

    private static String getConfig(String key){
        return PropertiesUtil.getProperties("redis.properties",key);
    }
}
